﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Data.Objects;

namespace Defero.Model
{
    public class SaleRowConfiguration : EntityConfiguration<SaleRow>
    {
        public SaleRowConfiguration() 
        {
            Property(e => e.Id).IsIdentity();
            Property(e => e.Quantity);
            Property(e => e.Total);

            Relationship(e => e.Sale)
                .FromProperty(e => e.Details)
                .IsRequired();
        }
    }
}
